﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class PrefabName
{
    public const string strAbatis = "Abatis";
    public const string strAdd_ARMOR = "Add_ARMOR";
    public const string strAdd_ARMOR_II = "Add_ARMOR_II";
    public const string strAdd_ARMOR_III = "Add_ARMOR_III";
    public const string strAdd_ARMOR_IIII = "Add_ARMOR_IIII";
    public const string strAdd_Damage = "Add_Damage";
    public const string strAdd_Damage_II = "Add_Damage_II";
    public const string strAdd_Damage_III = "Add_Damage_III";
    public const string strAdd_Damage_IIII = "Add_Damage_IIII";
    public const string strAdd_MovementSpeed = "Add_MovementSpeed";
    public const string strAdd_MovementSpeed_II = "Add_MovementSpeed_II";
    public const string strAdd_MovementSpeed_III = "Add_MovementSpeed_III";
    public const string strAdd_MovementSpeed_IIII = "Add_MovementSpeed_IIII";
    public const string strAdd_ProjectileSpeed = "Add_ProjectileSpeed";
    public const string strAdd_ProjectileSpeed_II = "Add_ProjectileSpeed_II";
    public const string strAdd_ProjectileSpeed_III = "Add_ProjectileSpeed_III";
    public const string strAdd_ProjectileSpeed_IIII = "Add_ProjectileSpeed_IIII";
    public const string strAdd_ReloadTime = "Add_ReloadTime";
    public const string strAdd_ReloadTime_II = "Add_ReloadTime_II";
    public const string strAdd_ReloadTime_III = "Add_ReloadTime_III";
    public const string strAdd_ReloadTime_IIII = "Add_ReloadTime_IIII";
    public const string strBoss1 = "Boss1";
    public const string strBoss2 = "Boss2";
    public const string strBrick = "Brick";
    public const string strBrick4 = "Brick4";
    public const string strBullet_2 = "Bullet_2";
    public const string strbullet_Canon = "bullet_Canon";
    public const string strbullet_Firethrower = "bullet_Firethrower";
    public const string strbullet_Lightning = "bullet_Lightning";
    public const string strBullet_MapShow = "Bullet_MapShow";
    public const string strbullet_Minigun = "bullet_Minigun";
    public const string strbullet_Rocket = "bullet_Rocket";
    public const string strBullet_Shock_Sc = "Bullet_Shock_Sc";
    public const string strbullet_ShockGun = "bullet_ShockGun";
    public const string strCanonExplosion = "CanonExplosion";
    public const string strCrash = "Crash";
    public const string strEnemy = "Enemy";
    public const string strEvent_Bomb = "Event_Bomb";
    public const string strEvent_Dzot = "Event_Dzot";
    public const string strEvent_P_Down = "Event_P_Down";
    public const string strEvent_P_Up = "Event_P_Up";
    public const string strEvent_Rec = "Event_Rec";
    public const string strEventBuilding = "EventBuilding";
    public const string strEventObj_Mirror = "EventObj_Mirror";
    public const string strEventP = "EventP";
    public const string strFlag = "Flag";
    public const string strFlag_I = "Flag_I";
    public const string strFlag_II = "Flag_II";
    public const string strFlag_III = "Flag_III";
    public const string strFlyShip = "FlyShip";
    public const string strHeadGun_Canon = "HeadGun_Canon";
    public const string strHeadGun_Firethrower = "HeadGun_Firethrower";
    public const string strHeadGun_Lightning = "HeadGun_Lightning";
    public const string strHeadGun_Minigun = "HeadGun_Minigun";
    public const string strHeadGun_Rocket = "HeadGun_Rocket";
    public const string strHeadGun_ShockGun = "HeadGun_ShockGun";
    public const string strMinigunExplosion = "MinigunExplosion";
    public const string strObstacle = "Obstacle";
    public const string strObstacleCube = "ObstacleCube";
    public const string strPlayer = "Player";
    public const string strRocketExplosion = "RocketExplosion";
    public const string strTank_Bron = "Tank_Bron";
    public const string strTank_DarkBoss = "Tank_DarkBoss";
    public const string strTank_Easy = "Tank_Easy";
    public const string strTank_Electro = "Tank_Electro";
    public const string strTank_Fire = "Tank_Fire";
    public const string strTank_Hard = "Tank_Hard";
    public const string strTank_Normal = "Tank_Normal";
    public const string strTank_Nuc = "Tank_Nuc";
    public const string strTank_Raket = "Tank_Raket";
    public const string strTankExpl = "TankExpl";
    public const string strTankLive = "TankLive";
    public const string strTankP_B = "TankP_B";
    public const string strTankRotGun = "TankRotGun";
    public const string strTerr = "Terr";
    public const string strTerr_0 = "Terr_0";
    public const string strTerr_1 = "Terr_1";
    public const string strTerr_10 = "Terr_10";
    public const string strTerr_100 = "Terr_100";
    public const string strTerr_101 = "Terr_101";
    public const string strTerr_102 = "Terr_102";
    public const string strTerr_103 = "Terr_103";
    public const string strTerr_104 = "Terr_104";
    public const string strTerr_105 = "Terr_105";
    public const string strTerr_106 = "Terr_106";
    public const string strTerr_107 = "Terr_107";
    public const string strTerr_108 = "Terr_108";
    public const string strTerr_109 = "Terr_109";
    public const string strTerr_11 = "Terr_11";
    public const string strTerr_110 = "Terr_110";
    public const string strTerr_12 = "Terr_12";
    public const string strTerr_13 = "Terr_13";
    public const string strTerr_14 = "Terr_14";
    public const string strTerr_15 = "Terr_15";
    public const string strTerr_16 = "Terr_16";
    public const string strTerr_17 = "Terr_17";
    public const string strTerr_18 = "Terr_18";
    public const string strterr_19 = "terr_19";
    public const string strTerr_2 = "Terr_2";
    public const string strterr_20 = "terr_20";
    public const string strTerr_21 = "Terr_21";
    public const string strterr_22 = "terr_22";
    public const string strterr_23 = "terr_23";
    public const string strterr_24 = "terr_24";
    public const string strterr_25 = "terr_25";
    public const string strterr_26 = "terr_26";
    public const string strTerr_27 = "Terr_27";
    public const string strTerr_28 = "Terr_28";
    public const string strTerr_29 = "Terr_29";
    public const string strTerr_3 = "Terr_3";
    public const string strTerr_30 = "Terr_30";
    public const string strTerr_31 = "Terr_31";
    public const string strTerr_32 = "Terr_32";
    public const string strTerr_33 = "Terr_33";
    public const string strterr_34 = "terr_34";
    public const string strterr_35 = "terr_35";
    public const string strterr_36 = "terr_36";
    public const string strterr_37 = "terr_37";
    public const string strterr_38 = "terr_38";
    public const string strTerr_4 = "Terr_4";
    public const string strterr_41 = "terr_41";
    public const string strTerr_42 = "Terr_42";
    public const string strTerr_43 = "Terr_43";
    public const string strTerr_44 = "Terr_44";
    public const string strterr_45 = "terr_45";
    public const string strterr_46 = "terr_46";
    public const string strterr_47 = "terr_47";
    public const string strterr_48 = "terr_48";
    public const string strterr_49 = "terr_49";
    public const string strTerr_5 = "Terr_5";
    public const string strterr_50 = "terr_50";
    public const string strTerr_51 = "Terr_51";
    public const string strTerr_52 = "Terr_52";
    public const string strTerr_53 = "Terr_53";
    public const string strTerr_54 = "Terr_54";
    public const string strTerr_55 = "Terr_55";
    public const string strterr_56 = "terr_56";
    public const string strterr_57 = "terr_57";
    public const string strterr_58 = "terr_58";
    public const string strterr_59 = "terr_59";
    public const string strTerr_6 = "Terr_6";
    public const string strTerr_61 = "Terr_61";
    public const string strterr_62 = "terr_62";
    public const string strterr_63 = "terr_63";
    public const string strTerr_64 = "Terr_64";
    public const string strTerr_65 = "Terr_65";
    public const string strTerr_66 = "Terr_66";
    public const string strTerr_67 = "Terr_67";
    public const string strTerr_68 = "Terr_68";
    public const string strTerr_69 = "Terr_69";
    public const string strTerr_7 = "Terr_7";
    public const string strTerr_70 = "Terr_70";
    public const string strTerr_71 = "Terr_71";
    public const string strTerr_74 = "Terr_74";
    public const string strterr_75 = "terr_75";
    public const string strterr_76 = "terr_76";
    public const string strterr_77 = "terr_77";
    public const string strterr_78 = "terr_78";
    public const string strterr_79 = "terr_79";
    public const string strTerr_8 = "Terr_8";
    public const string strTerr_81 = "Terr_81";
    public const string strTerr_82 = "Terr_82";
    public const string strTerr_83 = "Terr_83";
    public const string strTerr_84 = "Terr_84";
    public const string strTerr_85 = "Terr_85";
    public const string strTerr_86 = "Terr_86";
    public const string strTerr_87 = "Terr_87";
    public const string strTerr_88 = "Terr_88";
    public const string strTerr_9 = "Terr_9";
    public const string strterr_90 = "terr_90";
    public const string strterr_91 = "terr_91";
    public const string strterr_92 = "terr_92";
    public const string strterr_93 = "terr_93";
    public const string strterr_94 = "terr_94";
    public const string strTerr_95 = "Terr_95";
    public const string strTerr_96 = "Terr_96";
    public const string strTerr_97 = "Terr_97";
    public const string strTerr_98 = "Terr_98";
    public const string strTerr_99 = "Terr_99";
    public const string strWallCrashes = "WallCrashes";

    public static string GetMatchedTerrPrefab(string terrTypeInMap)
    {
        if (terrDict.Count == 0)
        {
            InitializeTerrDict();        }
        //terrTypeInMap: TERR15
        var key = terrTypeInMap.Substring("TERR".Length);
        if (terrDict.ContainsKey(key))
        { return terrDict[key]; }
        else
        { return terrTypeInMap; }
    }

    private static void InitializeTerrDict()
    {
        terrDict.Add("0", strTerr_0);
        terrDict.Add("1", strTerr_1);
        terrDict.Add("10", strTerr_10);
        terrDict.Add("100", strTerr_100);
        terrDict.Add("101", strTerr_101);
        terrDict.Add("102", strTerr_102);
        terrDict.Add("103", strTerr_103);
        terrDict.Add("104", strTerr_104);
        terrDict.Add("105", strTerr_105);
        terrDict.Add("106", strTerr_106);
        terrDict.Add("107", strTerr_107);
        terrDict.Add("108", strTerr_108);
        terrDict.Add("109", strTerr_109);
        terrDict.Add("11", strTerr_11);
        terrDict.Add("110", strTerr_110);
        terrDict.Add("12", strTerr_12);
        terrDict.Add("13", strTerr_13);
        terrDict.Add("14", strTerr_14);
        terrDict.Add("15", strTerr_15);
        terrDict.Add("16", strTerr_16);
        terrDict.Add("17", strTerr_17);
        terrDict.Add("18", strTerr_18);
        terrDict.Add("19", strterr_19);
        terrDict.Add("2", strTerr_2);
        terrDict.Add("20", strterr_20);
        terrDict.Add("21", strTerr_21);
        terrDict.Add("22", strterr_22);
        terrDict.Add("23", strterr_23);
        terrDict.Add("24", strterr_24);
        terrDict.Add("25", strterr_25);
        terrDict.Add("26", strterr_26);
        terrDict.Add("27", strTerr_27);
        terrDict.Add("28", strTerr_28);
        terrDict.Add("29", strTerr_29);
        terrDict.Add("3", strTerr_3);
        terrDict.Add("30", strTerr_30);
        terrDict.Add("31", strTerr_31);
        terrDict.Add("32", strTerr_32);
        terrDict.Add("33", strTerr_33);
        terrDict.Add("34", strterr_34);
        terrDict.Add("35", strterr_35);
        terrDict.Add("36", strterr_36);
        terrDict.Add("37", strterr_37);
        terrDict.Add("38", strterr_38);
        terrDict.Add("4", strTerr_4);
        terrDict.Add("41", strterr_41);
        terrDict.Add("42", strTerr_42);
        terrDict.Add("43", strTerr_43);
        terrDict.Add("44", strTerr_44);
        terrDict.Add("45", strterr_45);
        terrDict.Add("46", strterr_46);
        terrDict.Add("47", strterr_47);
        terrDict.Add("48", strterr_48);
        terrDict.Add("49", strterr_49);
        terrDict.Add("5", strTerr_5);
        terrDict.Add("50", strterr_50);
        terrDict.Add("51", strTerr_51);
        terrDict.Add("52", strTerr_52);
        terrDict.Add("53", strTerr_53);
        terrDict.Add("54", strTerr_54);
        terrDict.Add("55", strTerr_55);
        terrDict.Add("56", strterr_56);
        terrDict.Add("57", strterr_57);
        terrDict.Add("58", strterr_58);
        terrDict.Add("59", strterr_59);
        terrDict.Add("6", strTerr_6);
        terrDict.Add("61", strTerr_61);
        terrDict.Add("62", strterr_62);
        terrDict.Add("63", strterr_63);
        terrDict.Add("64", strTerr_64);
        terrDict.Add("65", strTerr_65);
        terrDict.Add("66", strTerr_66);
        terrDict.Add("67", strTerr_67);
        terrDict.Add("68", strTerr_68);
        terrDict.Add("69", strTerr_69);
        terrDict.Add("7", strTerr_7);
        terrDict.Add("70", strTerr_70);
        terrDict.Add("71", strTerr_71);
        terrDict.Add("74", strTerr_74);
        terrDict.Add("75", strterr_75);
        terrDict.Add("76", strterr_76);
        terrDict.Add("77", strterr_77);
        terrDict.Add("78", strterr_78);
        terrDict.Add("79", strterr_79);
        terrDict.Add("8", strTerr_8);
        terrDict.Add("81", strTerr_81);
        terrDict.Add("82", strTerr_82);
        terrDict.Add("83", strTerr_83);
        terrDict.Add("84", strTerr_84);
        terrDict.Add("85", strTerr_85);
        terrDict.Add("86", strTerr_86);
        terrDict.Add("87", strTerr_87);
        terrDict.Add("88", strTerr_88);
        terrDict.Add("9", strTerr_9);
        terrDict.Add("90", strterr_90);
        terrDict.Add("91", strterr_91);
        terrDict.Add("92", strterr_92);
        terrDict.Add("93", strterr_93);
        terrDict.Add("94", strterr_94);
        terrDict.Add("95", strTerr_95);
        terrDict.Add("96", strTerr_96);
        terrDict.Add("97", strTerr_97);
        terrDict.Add("98", strTerr_98);
        terrDict.Add("99", strTerr_99);
    }

    private static Dictionary<string, string> terrDict = new Dictionary<string, string>();
}
